-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drupal good default Initial PR #6
Drupal good default Initial PR #6
Conversation
Thanks for this! A couple notes:
Same error. @nikathone are there other UID/GID variables I need to tweak? |
Yes +1 for the data folder. Maybe then we can have something like |
We manually cat'ed this to the end of the settings.php file https://gist.github.com/nikathone/e6eba02c6f8275f14d68d2b1d473c026 |
Thanks! initial test
I'll blow everything away and test again |
I set Then when I run I get
|
Looks like files is the problem: fixing the initial instructions
|
Nia and I screenshared again- there's still an issue, this time with the Mariadb. He's going to work on this and revise the PR, and then I'll test again. |
@noahwsmith I have been working on this script which is almost done and will add it on this PR. It's goal is to make it easier to create and prepare the |
Thank you! I'll stay tuned... |
Ok. I things are much easier to test. I will update the pull request description accordingly. |
@nikathone this works very nicely on first run! Thank you. @g7morris and I will spend some more time with it tomorrow, and we'll hold some agenda time on Thursday in the 2pm Eastern call to discuss with the team. |
I'm consistently getting the following error when trying
I'm just flailing about though. Is there some obvious step I'm missing? |
@dannylamb thanks for testing and reporting back on this issue. I will add a debug flag option to be passed onto the make actions and see if that can give us the exact error which caused sed to fail. |
…be now copied from the base image.
… since now it will be copied from the base image.
…n for the base image.
@nikathone Reporting the following from testing: Everything is working great except the timezone. Test resultsIssue #1
Issue #2
Issue #3
-- Remaining steps prior to merge with MVP2a & MVP3
Changes in direction prior to merge@niakathone I hate to be a pain but can we revert the current Docker-compose service name changes of For now, I've discussed with @noahwsmith as well and we think the easiest thing we can do without having to manage 3 separate mariadbs, is to continue to use one and to add a .sql script that runs upon the first mariadb init which will create the following:
This way everything is created from the start even if users don't use fcrepo or gemini later on at least they exist and are ready to use from the first start. I will work on this script and adapt from what we already have in MVP3. Per the https://hub.docker.com/_/mariadb section called I am not sure how we would make that SQL file dynamic so I'm guessing we'll hardcode user values for now and iterate after the merge. I think once we can clear the Solr swap and any appropriate cleanup, we can run a test merge and see what fixes are necessary. |
@g7morris I just pushed a change which revert back to mariadb instead of drupal db and I am totally on board with trying one db service to serve the other services. For the Also can you give a screenshot or a specific command you are using to check the timezone? Thanks again for the tests and feedback. |
One more thing once we have the |
@nikathone Thanks! The process for checking the timezone comes up when I run
|
@nikathone Re I can work with you on that post-merge, I should be able to help corral these for the most part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikathone This looks good except on line 41 of the docker-compose.yml, should this section of the drupal
service that is currently:
depends_on:
drupal_db:
condition: service_healthy
actually be changed to:
depends_on:
mariadb:
condition: service_healthy
@nikathone FYI I've started the SOLR work here g7morris@98ccd36 So far so good using the official image
lrwxrwxrwx 1 solr solr 36 Mar 20 20:52 _default -> /opt/docker-solr/configsets/_default
lrwxrwxrwx 1 solr solr 55 Mar 20 20:52 sample_techproducts_configs -> /opt/docker-solr/configsets/sample_techproducts_configs
lrwxrwxrwx 1 solr solr 51 Mar 20 20:52 search_api_solr_8.x-3.2 -> /opt/docker-solr/configsets/search_api_solr_8.x-3.2 There is a pre-existing [Followup edit / question] @nikathone Within the Makefile I'm assuming I can simply comment out the solr_init section now e.g. solr_init:
./scripts/solr/create-core.sh However for
Once I figure that out, I can perform the test tomorrow. |
Removing
and editing If you want to keep the |
@nikathone Thanks for that, was able to make things work-ish. Everything spins up correctly except Solr doesn't seem to make a core by default anymore. When I was testing the service by itself, I could I also saw that both the mariadb and drupal services don't have a container_name: |
I mean always try to avoid to hard code container name and only rely on the project and service name to figured out the container name. This way your apps won't have anything based on something which can be auto generated when deployed on live environment. |
Agreed but that then confirms there is an issue with the container and volume naming as the drupal and mariadb container names and volumes names start with islandora_ instead of the value in the .env which is I'm okay with going the other way and striping out hard coded container name designations for all other services once we can see what is up with this. ^ Okay I'm testing commenting out all container name references now as my previous addition of all the hardcoded container names failed too. |
Ok. |
Okay reporting this as an issue now: All services in The docker volumes are volumes:
mariadb-data:
activemq-data:
solr-data: The ### PROJECT SETTINGS
PROJECT_NAME=isle_dc_proto2b
PROJECT_BASE_URL=idcp2b.localhost
PROJECT_SHORT_ID=idcp2b But the outcome is: Creating islandora_cantaloupe_1 ... done
Creating islandora_traefik_1 ... done
Creating islandora_activemq_1 ... done
Creating islandora_homarus_1 ... done
Creating islandora_mariadb_1 ... done
Creating islandora_hypercube_1 ... done
Creating islandora_crayfits_1 ... done
Creating islandora_fits_1 ... done
Creating islandora_alpaca-connector_1 ... done
Creating islandora_solr_1 ... done
Creating islandora_houdini_1 ... done
Creating islandora_drupal_1 ... done
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cc7394161047 islandora_drupal "docker-webserver-en…" 2 minutes ago Up 2 minutes 80/tcp, 443/tcp, 8080/tcp, 9000/tcp islandora_drupal_1
2b63a74935e1 harvardlts/fitsservlet_container:1.5.0 "/usr/bin/supervisord" 3 minutes ago Up 3 minutes 8009/tcp, 8080/tcp, 8443/tcp islandora_fits_1
e63206003016 birkland/isle-alpaca "karaf server" 3 minutes ago Up 3 minutes 1099/tcp, 8101/tcp, 8181/tcp, 44444/tcp islandora_alpaca-connector_1
399dd17dd8d3 borndigital/isle-crayfits:mvp2-alpha "docker-php-entrypoi…" 3 minutes ago Up 3 minutes 80/tcp, 8000/tcp islandora_crayfits_1
b331821540cc borndigital/isle-hypercube:mvp2-alpha "docker-php-entrypoi…" 3 minutes ago Up 3 minutes 80/tcp, 8000/tcp islandora_hypercube_1
6326e147891b solr:8.4.1 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:8983->8983/tcp islandora_solr_1
39c7a9e93ebb borndigital/isle-houdini:mvp2-alpha "docker-php-entrypoi…" 3 minutes ago Up 3 minutes 80/tcp, 8000/tcp islandora_houdini_1
0f158f8aadfe borndigital/isle-homarus:mvp2-alpha "docker-php-entrypoi…" 3 minutes ago Up 3 minutes 80/tcp, 8000/tcp islandora_homarus_1
94d6b16cad13 mariadb:10.3.22 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes (healthy) 3306/tcp islandora_mariadb_1
0852db0ae3bb rmohr/activemq "/bin/sh -c 'bin/act…" 3 minutes ago Up 3 minutes 1883/tcp, 5672/tcp, 61613-61614/tcp, 61616/tcp, 0.0.0.0:8161->8161/tcp islandora_activemq_1
25fc185424e7 lyrasis/cantaloupe:latest "/build/entrypoint.sh" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:8182->8182/tcp islandora_cantaloupe_1
a7d7b9fa4241 traefik:2.1.3 "/entrypoint.sh --ap…" 3 minutes ago Up 3 minutes 0.0.0.0:8000->80/tcp islandora_traefik_1
docker volume ls
local islandora_activemq-data
local islandora_mariadb-data
local islandora_solr-data I still am able to see my site at http://idcp2b.localhost:8000 which is good but still no Solr core created. Is this partially due to line 5 in the Makefile? [Followup] interesting. I replaced I'm probably not making any more sense for the day. Thanks for the help. Let's catch up tomorrow. Excited to play with all of this. |
drupal_init: | ||
./scripts/drupal/init.sh --codebase $(isle_codebase) | ||
|
||
solr_init: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor non-issue. Should be added to .PHONY
targets.
Expose the database root password to Drupal environment
PR Testing Getting started
Clone the fork repo
Running the containers
With this repo you can run drupal using
drupal/recommended-project
orislandora/drupal-project
. I have added aMakefile
to facilitate with the setup and running the needed commands. The steps below will download the codebase, setupdata/drupal/
and rundocker-compose
.make isle_codebase=drupal
to create codebase withdrupal/recommended-project
make isle_codebase=islandora
to create codebase withislandora/drupal-project
COMPOSER_MEMORY_LIMIT=-1 make isle_codebase=islandora
You might need to run
docker stats
to check CPU usage for each container. SinceAUTO_INSTALL
is on it might take some time for thedrupal
container CPU usage to come down once it's done. So give thedrupal
container up to 5-10min to complete the site installation. Then visitislandora.localhost:8000
in chrome or if using any non chromium web browser addislandora.localhost
in the/etc/hosts
.Bringing down the containers
make down
to just bring down the container without cleaning up all the various docker assets related to the docker compose.make clean
to delete everything from thecodebase
,data/drupal
to all containers, images and volumes associated withdocker-compose.yml
make clean_local
For more make commands please check the
Makefile
.Interacting with the container
docker-compose -p islandora exec drupal drush uli
: to get a one time login url for admin.docker-compose -p islandora exec drupal drush cr
: to clear cache.Notes
The
drupal.Dockerfile
still usingregistry.gitlab.com/nikathone/drupal-docker-good-defaults/php-nginx:latest
for php and nginx base image but this will change once we have a CI to buildimages/nginx-php/Dockerfile
.I did disable the SOLR service.
Also it might be a good idea to move the traefik service setup in it's own docker-compose file cause ideally they should only be one traefik service per local host.
I might have missed something since I was trying to avoid to add to many changes at once.